The rapid increase in the size, complexity and availability of computer programs has significantly increased the importance and the cost of maintaining and enhancing such programs. Errors in such programs ("bugs") or desired enhancements both require that the base code be fully understood, even after many years of use. It is well known that even the author of such code seldom understands the details of his or her own source code after a modest period of time. It is therefore common for the generator of original code to document the code by annotations in the program, by flowcharts, cross-references, variable definition lists, symbol-where-used-extracts, program slicing, selective highlighting of code, etc. These techniques are described in "Converting Legacy Code Into ADA: A Cognitive Approach," by J. M. Scandura, Computer 27, No. 4., pp. 55-61, April 1994, "Using an Enabling Technology to Reengineer Legacy Systems," by L. Markosian et al., Communications of the ACM 37, No. 5, pp. 58-70; May 1994, "Automated Support for Legacy Code Understanding," by J. Q. Ning et al, Communications of the ACM 37, No. 5, pp. 50-57, May 1994, "Program Understanding: Challenge for the 1990s," by T. A. Corbi, IBM Systems Journal 28, No 2, pp. 294-306, 1989, "From Program Comprehension to Tool Requirements for an Industrial Environment," by A. von Mayrhauser et al., Proceedings: IEEE Second Workshop on Program Comprehension, (Capri, Italy), pp. 78-86, IEEE Computer Society Press, Los Alamitos, Calif. (1993), and "Software Maintenance Crisis Resolution: The New IEEE Standard," by M. Lerner, Software Development 2, No 8, pp. 65-72, August 1994.
Numerous machine tools have become available for the analysis and understanding of source code. One type of tool is directed to assisting a user in understanding program flow through various routines and procedures that comprise a program. Tools of this type use a technique called program slicing to identify flow, or logic, paths to a target program statement. There are numerous references to program slicing in the literature. One reference, entitled Function Recovery Based on Program Slicing, F. Lanubile et al, Conference Proceedings on Software maintenance (CSM-93), (Sep. 27-30, 1993), IEEE Computer Society Press, discusses slicing in general and some variations thereto. Program slicing involves specifying a target program statement and a variable associated with the target statement. The program slice is then the smallest subset of statements of the entire program which include the target statement and which affect the value of the target variable. Thus a program slice involves all the statements on the paths to the target statement, plus many additional statements that are involved, directly or indirectly, in the resulting value of the target variable.
A common complaint is that program slicing produces far too much output in practical applications to the point that almost all statements in the program may be selected because of the variable dependencies affecting the target variable. With so much output produced, the program slice has not proven useful in answering the programmer's problems in many cases.